class Program
{
    static void Main(string[] args)
    {
        int i,a,b,c;
        for (i=100;i<=999;i++)
        {
            a = i / 100;
            b = (i-a*100)/10;
            c = i % 10;
            if (i == Math.Pow(a, 3) + Math.Pow(b, 3) + Math.Pow(c, 3))
                Console.WriteLine(i);
        }
        Console.ReadKey();
    }
}